import request from '@/utils/request'

export function outerRequesterList() {
  return request({
    url: '/hawk-eye/webhook/requester-identity-list',
    method: 'get'
  })
}

export function webhookList(query) {
  return request({
    url: '/hawk-eye/webhook/page',
    method: 'get',
    params: query
  })
}

export function webhookDetail(id) {
  return request({
    url: '/hawk-eye/webhook/detail/' + id,
    method: 'get'
  })
}

export function addWebhook(data) {
  return request({
    url: '/hawk-eye/webhook/save',
    method: 'post',
    data: data
  })
}

export function updateWebhook(data) {
  return request({
    url: '/hawk-eye/webhook/update',
    method: 'put',
    data: data
  })
}

export function removeWebhook(id) {
  return request({
    url: '/hawk-eye/webhook/remove/' + id,
    method: 'delete'
  })
}
